<script type="text/javascript">
<!--

//-->
function SubmitLogin()
{
	document.forms['form'].action = 'user/user/login';
	document.forms['form'].submit();
}

function SubmitLogout()
{
	document.forms['form'].action = 'user/user/logout';
	document.forms['form'].submit();
}

function setVisible()
{
	
}
</script>
<div class="login">
	<form id="form" action="" method="get">
	<?php if (!Zend_Auth::getInstance()->hasIdentity())
	{?>
		<div class="bg_textfield">
			<input name="username" class="textfield" type="text">
		</div>
		<div class="bg_textfield">
			<input name="password" class="textfield" type="password">
		</div>
		<div class="login_btn">
				<input type="submit" name="submit" value="Đăng nhập" class="button_gray_login" onclick="SubmitLogin()"/>
		</div>
		<div class="link_login">
			<a href="#">Quên mật khẩu</a>|<a href="user/index/register">Đăng ký</a>
		</div>
		<?php }
		else {
		echo 'Welcome '.Zend_Auth::getInstance()->getStorage()->read()->username.' !'; 
		}?>
		<div class="link_login">
			<a href="#">Quản lý hình ảnh</a><br>
			<a href="#" onclick="SubmitLogout()">Đăng xuất</a>|<a href="#">Đổi mật khẩu</a>
		</div>
	</form>
</div>
